import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.List;
import java.util.Optional;
import java.util.PriorityQueue;
import java.util.concurrent.CopyOnWriteArrayList;
import java.util.concurrent.PriorityBlockingQueue;
import java.util.stream.Stream;

class Animal1{
   public int a;
   public void fun(){
      System.out.println("1111");
   }
   public Animal1 getAnimal(){
      return null;
   }

}
class dog extends  Animal1{

}


public class Animal {
   public static void main(String[] args) throws NoSuchFieldException {
      dog dog1 = new dog();
      dog1.fun();
      Animal1 animal1 = new Animal1();
  /*    Animal1 optional = Optional.ofNullable(animal1.getAnimal())
                        .map(a->a.getAnimal())
              .orElseThrow(NoSuchFieldException::new);
      System.out.println(optional);*/

      PriorityBlockingQueue<Integer> queue = new PriorityBlockingQueue<>();
      PriorityQueue<Integer> queue1 = new PriorityQueue<>((b,a)->{
         return a-b;
      });
      Thread thread = new Thread(()->{
         System.out.println("111");
      });

      List<String> list = new ArrayList<>();
      list.add("123");
      list.add("456");
      list.add("78978");
      list.add("167");
      list.add("67754");
list.stream().filter(s1->s1.startsWith("1"))
              .filter(s2->s2.length()==3)
              .forEach(s3-> System.out.println(s3));

  int[] arr = new int[]{1,2,3,4,5};
   Stream<String> stream = list.stream().filter(name->name.startsWith("1"));

   stream.forEach(name-> System.out.println(name));

   Stream<String> stream1 = list.stream();
      System.out.println(stream1.count());
      LocalDateTime dateTime = LocalDateTime.now();



   }
}
